-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiple context extraction support #6138
Add multiple context extraction support #6138
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 cases. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.041 s) : 0, 1041368
Total [baseline] (9.288 s) : 0, 9288291
Agent [candidate] (1.039 s) : 0, 1039074
Total [candidate] (9.332 s) : 0, 9331605
section appsec
Agent [baseline] (1.117 s) : 0, 1117296
Total [baseline] (9.43 s) : 0, 9429785
Agent [candidate] (1.129 s) : 0, 1129080
Total [candidate] (9.373 s) : 0, 9373253
section iast
Agent [baseline] (1.15 s) : 0, 1149991
Total [baseline] (9.489 s) : 0, 9489078
Agent [candidate] (1.158 s) : 0, 1157832
Total [candidate] (9.551 s) : 0, 9551005
section profiling
Agent [baseline] (1.229 s) : 0, 1228824
Total [baseline] (9.528 s) : 0, 9527951
Agent [candidate] (1.22 s) : 0, 1219509
Total [candidate] (9.475 s) : 0, 9474820
gantt
title petclinic - break down per module: candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (650.02 ms) : 0, 650020
BytebuddyAgent [candidate] (647.411 ms) : 0, 647411
GlobalTracer [baseline] (295.356 ms) : 0, 295356
GlobalTracer [candidate] (295.697 ms) : 0, 295697
AppSec [baseline] (49.13 ms) : 0, 49130
AppSec [candidate] (49.362 ms) : 0, 49362
Remote Config [baseline] (703.575 µs) : 0, 704
Remote Config [candidate] (676.779 µs) : 0, 677
Telemetry [baseline] (11.492 ms) : 0, 11492
Telemetry [candidate] (11.479 ms) : 0, 11479
section appsec
BytebuddyAgent [baseline] (644.62 ms) : 0, 644620
BytebuddyAgent [candidate] (651.468 ms) : 0, 651468
GlobalTracer [baseline] (293.043 ms) : 0, 293043
GlobalTracer [candidate] (296.389 ms) : 0, 296389
AppSec [baseline] (137.795 ms) : 0, 137795
AppSec [candidate] (139.007 ms) : 0, 139007
Remote Config [baseline] (645.686 µs) : 0, 646
Remote Config [candidate] (645.236 µs) : 0, 645
Telemetry [baseline] (6.862 ms) : 0, 6862
Telemetry [candidate] (6.923 ms) : 0, 6923
section iast
BytebuddyAgent [baseline] (764.437 ms) : 0, 764437
BytebuddyAgent [candidate] (770.964 ms) : 0, 770964
GlobalTracer [baseline] (274.181 ms) : 0, 274181
GlobalTracer [candidate] (276.693 ms) : 0, 276693
AppSec [baseline] (46.839 ms) : 0, 46839
AppSec [candidate] (46.793 ms) : 0, 46793
Remote Config [baseline] (571.73 µs) : 0, 572
Remote Config [candidate] (573.577 µs) : 0, 574
Telemetry [baseline] (13.985 ms) : 0, 13985
Telemetry [candidate] (12.064 ms) : 0, 12064
IAST [baseline] (15.6 ms) : 0, 15600
IAST [candidate] (16.007 ms) : 0, 16007
section profiling
ProfilingAgent [baseline] (89.594 ms) : 0, 89594
ProfilingAgent [candidate] (88.043 ms) : 0, 88043
BytebuddyAgent [baseline] (661.6 ms) : 0, 661600
BytebuddyAgent [candidate] (656.686 ms) : 0, 656686
GlobalTracer [baseline] (361.064 ms) : 0, 361064
GlobalTracer [candidate] (359.393 ms) : 0, 359393
AppSec [baseline] (49.579 ms) : 0, 49579
AppSec [candidate] (48.902 ms) : 0, 48902
Remote Config [baseline] (652.579 µs) : 0, 653
Remote Config [candidate] (649.543 µs) : 0, 650
Telemetry [baseline] (11.436 ms) : 0, 11436
Telemetry [candidate] (11.534 ms) : 0, 11534
Profiling [baseline] (89.618 ms) : 0, 89618
Profiling [candidate] (88.066 ms) : 0, 88066
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.033 s) : 0, 1032752
Total [baseline] (8.75 s) : 0, 8749974
Agent [candidate] (1.036 s) : 0, 1036351
Total [candidate] (8.773 s) : 0, 8772504
section iast
Agent [baseline] (1.156 s) : 0, 1155909
Total [baseline] (9.314 s) : 0, 9313672
Agent [candidate] (1.152 s) : 0, 1152294
Total [candidate] (9.324 s) : 0, 9323509
section iast_TELEMETRY_OFF
Agent [baseline] (1.153 s) : 0, 1153295
Total [baseline] (9.301 s) : 0, 9301196
Agent [candidate] (1.146 s) : 0, 1146480
Total [candidate] (9.275 s) : 0, 9275267
gantt
title insecure-bank - break down per module: candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (644.626 ms) : 0, 644626
BytebuddyAgent [candidate] (645.598 ms) : 0, 645598
GlobalTracer [baseline] (293.011 ms) : 0, 293011
GlobalTracer [candidate] (295.175 ms) : 0, 295175
AppSec [baseline] (48.625 ms) : 0, 48625
AppSec [candidate] (49.064 ms) : 0, 49064
Remote Config [baseline] (697.306 µs) : 0, 697
Remote Config [candidate] (682.349 µs) : 0, 682
Telemetry [baseline] (11.296 ms) : 0, 11296
Telemetry [candidate] (11.359 ms) : 0, 11359
section iast
BytebuddyAgent [baseline] (770.223 ms) : 0, 770223
BytebuddyAgent [candidate] (765.875 ms) : 0, 765875
GlobalTracer [baseline] (274.27 ms) : 0, 274270
GlobalTracer [candidate] (275.844 ms) : 0, 275844
AppSec [baseline] (46.722 ms) : 0, 46722
AppSec [candidate] (46.707 ms) : 0, 46707
IAST [baseline] (16.106 ms) : 0, 16106
IAST [candidate] (16.655 ms) : 0, 16655
Remote Config [baseline] (560.573 µs) : 0, 561
Remote Config [candidate] (578.656 µs) : 0, 579
Telemetry [baseline] (13.307 ms) : 0, 13307
Telemetry [candidate] (12.116 ms) : 0, 12116
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (763.804 ms) : 0, 763804
BytebuddyAgent [candidate] (759.222 ms) : 0, 759222
GlobalTracer [baseline] (276.462 ms) : 0, 276462
GlobalTracer [candidate] (275.685 ms) : 0, 275685
AppSec [baseline] (47.04 ms) : 0, 47040
AppSec [candidate] (46.665 ms) : 0, 46665
IAST [baseline] (18.267 ms) : 0, 18267
IAST [candidate] (18.669 ms) : 0, 18669
Remote Config [baseline] (580.435 µs) : 0, 580
Remote Config [candidate] (599.835 µs) : 0, 600
Telemetry [baseline] (12.555 ms) : 0, 12555
Telemetry [candidate] (11.176 ms) : 0, 11176
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section baseline
no_agent (1.357 ms) : 1338, 1376
. : milestone, 1357,
appsec (1.693 ms) : 1668, 1718
. : milestone, 1693,
iast (1.491 ms) : 1467, 1515
. : milestone, 1491,
profiling (1.469 ms) : 1444, 1494
. : milestone, 1469,
tracing (1.443 ms) : 1418, 1468
. : milestone, 1443,
section candidate
no_agent (1.338 ms) : 1319, 1357
. : milestone, 1338,
appsec (1.724 ms) : 1699, 1748
. : milestone, 1724,
iast (1.464 ms) : 1440, 1488
. : milestone, 1464,
profiling (1.463 ms) : 1438, 1487
. : milestone, 1463,
tracing (1.471 ms) : 1447, 1495
. : milestone, 1471,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.23.0-SNAPSHOT~c1f32c9e2d, baseline=1.23.0-SNAPSHOT~0a613832c1
dateFormat X
axisFormat %s
section baseline
no_agent (360.98 µs) : 340, 382
. : milestone, 361,
iast (456.957 µs) : 436, 478
. : milestone, 457,
iast_FULL (525.054 µs) : 504, 546
. : milestone, 525,
iast_INACTIVE (440.818 µs) : 420, 462
. : milestone, 441,
iast_TELEMETRY_OFF (459.434 µs) : 438, 481
. : milestone, 459,
tracing (432.332 µs) : 411, 454
. : milestone, 432,
section candidate
no_agent (364.679 µs) : 344, 385
. : milestone, 365,
iast (461.747 µs) : 441, 483
. : milestone, 462,
iast_FULL (527.755 µs) : 507, 549
. : milestone, 528,
iast_INACTIVE (438.185 µs) : 417, 459
. : milestone, 438,
iast_TELEMETRY_OFF (462.084 µs) : 441, 484
. : milestone, 462,
tracing (437.619 µs) : 416, 460
. : milestone, 438,
|
a015c11
to
1ae9781
Compare
I marked the PR ready for review as it should be feature compete and pass the related system tests (currently in development). |
Extract multiple propagated context according the new W3C trace context initiative. Add a config to limit to the first valid one.
… present using W3CPtags
1ae9781
to
f0fa179
Compare
…ags instance It will prevent the only case where a DDSpanContext can have a null PTags. This will allow to store tracestate if found from another valid extracted context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What Does This Do
DD_TRACE_PROPAGATION_EXTRACT_FIRST
configuration to limit to the first valid one,Motivation
This will improve W3C tracecontext standard compatibility.
W3C trace state will be extracted from W3C extracted context even using Datadog headers.
Additional Notes
An addition PR is coming to documentation repository for the new configuration key and behavior change.
Jira tickets:
Few comments that might help reviewing:
CompoundExtractor
--> The RFC has a diagram to help understand the expected behavior. I tried to comment it the most possible for futur maintainability.original
from W3CPTags was removed in favor of the new generic field.ContextInterpreter
and make sure PTags are always defined (empty at least) --> PTags factory was the same for all context interpreter using it. Moving it to parent allow to make empty initialization if not done by the child interpreter. It does not introduce performance overhead as PTags will always be creating when creating a span from an extracted context (even an empty instance). Creating it atExtractedContext
level ensure we can propagatetracestate
inCompoundExtractor
.